package org.action;

import org.model.Xsb;
import org.work.DBConn;
import com.opensymphony.xwork2.ActionSupport;

public class SaveAction extends ActionSupport {
	private Xsb xs;

	public Xsb getXs() {
		return xs;
	}

	public void setXs(Xsb xs) {
		this.xs = xs;

	}

	public String execute() throws Exception {
		DBConn db = new DBConn();
		Xsb stu = new Xsb();
		stu.setXh(xs.getXh());
		stu.setXm(xs.getXm());
		stu.setBz(xs.getBz());
		stu.setZy(xs.getZy());
		stu.setXb(xs.getXb());
		stu.setCssj(xs.getCssj());
		if (db.save(stu)) {
			return SUCCESS;

		} else
			return ERROR;

	}
}